#include <OgreSceneManager.h>
#include <OgrePrerequisites.h>
#include <OgreCamera.h>
#include <OgreRoot.h>
#include <exceptionhandling.h>
#include <OgreColourValue.h>
#include <OgreLight.h>
#include <OgreCommon.h>

#define DLL_EXPORT __declspec(dllexport)

using namespace Ogre;

extern "C" DLL_EXPORT Camera *call_createCamera(void *ptr, const char *name)
{
    return ((SceneManager*)ptr)->createCamera((String)name);
}

extern "C" DLL_EXPORT Entity *call_createEntity(SceneManager *ptr, const char *entityName, const char *meshName,
                                                const char *groupName)
{
    return call3<const String&, const String&, const String&>
            (ptr, &SceneManager::createEntity, entityName, meshName, groupName);
}

extern "C" DLL_EXPORT SceneNode *call_getRootSceneNode(SceneManager *ptr)
{
    return ptr->getRootSceneNode();
}

extern "C" DLL_EXPORT void call_setAmbientLight(SceneManager *ptr, ColourValue *colour)
{
	ptr->setAmbientLight(*colour);
}

extern "C" DLL_EXPORT Light *call_createLight(SceneManager *ptr, const char *name)
{
	return ptr->createLight(name);
}

extern "C" DLL_EXPORT void call_setShadowTechnique(SceneManager *ptr, ShadowTechnique technique)
{
	ptr->setShadowTechnique(technique);
}